package com.oa.service.impl;

import com.oa.dao.DeptDao;
import com.oa.entity.Dept;
import com.oa.service.DeptService;

public class DeptServiceImpl implements DeptService {
	//调用dao层的代码
	private DeptDao deptDao;
	
	public DeptServiceImpl(){
		System.out.println("==创建DeptServiceImpl对象.....");
	}
	
	@Override
	public int saveDept(Dept dept) {
		int count =deptDao.saveDept(dept);//添加
		return count;
	}
	public DeptDao getDeptDao() {
		return deptDao;
	}
	public void setDeptDao(DeptDao deptDao) {
		this.deptDao = deptDao;
	}
	@Override
	public int deleteDept(int deptno) {
		return deptDao.deleteDept(deptno);
	}
	

}
